<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_gradient"
    android:paddingTop="@dimen/_20sdp"
    tools:context=".view.Activities.LoginActivity">

    <View
        android:id="@+id/view_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/ll_bg"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_weight="1" />

    <LinearLayout
        android:id="@+id/ll_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?attr/second_background"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/view_bg"
        app:layout_constraintVertical_weight="1" />

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nsv"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginHorizontal="@dimen/_20sdp"
        android:layout_marginVertical="@dimen/_80sdp"
        android:background="@drawable/bg_form_rounded"
        >
        <!-- Main block -->
        <LinearLayout
            android:id="@+id/ll_main_block"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingHorizontal="@dimen/_20sdp"
            android:paddingVertical="@dimen/_10sdp">

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/carAnimation"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/_110sdp"
                app:lottie_rawRes="@raw/grey_car"
                android:scaleType="centerInside"
                app:lottie_autoPlay="true"
                app:lottie_loop="false" />

            <!-- Email -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/_7sdp"
                android:layout_marginTop="@dimen/_7sdp"
                android:layout_marginBottom="@dimen/_3sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="22dp"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Почта"
                    android:textColor="?attr/title_EditText_text_color"
                    android:textSize="@dimen/_11ssp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="*"
                    android:textColor="?attr/red_dot"
                    android:textSize="@dimen/_12ssp" />
            </LinearLayout>

            <EditText
                android:id="@+id/et_email"
                android:layout_width="match_parent"
                android:layout_height="@dimen/_40sdp"
                android:background="@drawable/edit_text_form"
                android:fontFamily="@font/inter_medium"
                android:hint="Почта"
                android:inputType="textEmailAddress"
                android:paddingHorizontal="@dimen/_9sdp"
                android:paddingVertical="@dimen/_5sdp"
                android:textColor="?attr/EditText_text_color"
                android:textSize="@dimen/_12sdp"/>
            <!-- /Email -->

            <!-- Password -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/_7sdp"
                android:layout_marginTop="@dimen/_7sdp"
                android:layout_marginBottom="@dimen/_3sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Пароль"
                    android:textColor="?attr/title_EditText_text_color"
                    android:textSize="@dimen/_11ssp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="*"
                    android:textColor="?attr/red_dot"
                    android:textSize="@dimen/_12ssp" />
            </LinearLayout>

            <EditText
                android:id="@+id/et_password"
                android:layout_width="match_parent"
                android:layout_height="@dimen/_40sdp"
                android:background="@drawable/edit_text_form"
                android:fontFamily="@font/inter_medium"
                android:hint="Пароль"
                android:inputType="textPassword"
                android:paddingHorizontal="@dimen/_9sdp"
                android:paddingVertical="@dimen/_5sdp"
                android:textColor="?attr/EditText_text_color"
                android:textSize="@dimen/_12sdp" />
            <!-- /Password -->

            <Button
                android:id="@+id/btForgotPassword"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:paddingEnd="0dp"
                android:backgroundTint="#00FFFFFF"
                android:fontFamily="@font/inter_medium"
                android:includeFontPadding="false"
                android:text="Забыли пароль?"
                android:textColor="?attr/main_text_color"
                android:textSize="@dimen/_10ssp" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_marginTop="@dimen/_10sdp"
                android:layout_width="@dimen/_80sdp"
                android:layout_height="@dimen/_40sdp"
                android:layout_gravity="center">
                <androidx.cardview.widget.CardView
                    android:id="@+id/cv_login"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@android:color/transparent"
                    android:outlineSpotShadowColor="@color/purple"
                    app:cardCornerRadius="15dp"
                    app:cardElevation="15dp">
                    <ImageButton
                        android:id="@+id/ib_login"
                        android:layout_width="@dimen/_80sdp"
                        android:layout_height="@dimen/_40sdp"
                        android:layout_gravity="center"
                        android:background="@drawable/background_button_ripple"
                        android:src="@drawable/icon_array_to_right" />
                </androidx.cardview.widget.CardView>
                <ProgressBar
                    android:id="@+id/loading"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    android:indeterminateTint="?attr/purple"
                    android:visibility="gone"/>
            </androidx.constraintlayout.widget.ConstraintLayout>
            <Button
                android:id="@+id/b_create"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:backgroundTint="#00FFFFFF"
                android:fontFamily="@font/inter_medium"
                android:includeFontPadding="false"
                android:text="У вас нет аккаунта?"
                android:textColor="?attr/main_text_color"
                android:textSize="@dimen/_10ssp" />
        </LinearLayout><!-- /Main block -->
    </androidx.core.widget.NestedScrollView>

    <LinearLayout
        android:id="@+id/ll_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintBottom_toTopOf="@+id/nsv"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/inter_medium"
            android:gravity="center"
            android:includeFontPadding="false"
            android:text="Авторизуйтесь,"
            android:textColor="?attr/white"
            android:textSize="@dimen/_19ssp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/inter_medium"
            android:gravity="center"
            android:includeFontPadding="false"
            android:text="для продолжения"
            android:textColor="?attr/white"
            android:textSize="@dimen/_17ssp" />
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>